import request from '@/utils/request'

/**
 * // 获取分页角色
 * @param {*} params
 * @returns
 */
export const getRoleList = params => request.get('/sys/role', { params })

/**
 *  添加角色
 * @param {*} data
 * @returns
 */
export const upRoleList = data => request.post('/sys/role', data)

/**
 * 删除角色
 * @param {*} id
 * @returns
 */
export const delRoleList = id => request.delete(`/sys/role/${id}`)

/**
 * 修改角色
 * @param {*} data
 * @returns
 */
export const updataRole = data => request.put(`/sys/role/${data.id}`, data)

/**
 * 获取-角色详情
 * @returns
 */
export const upPermission = (id) => request.get(`/sys/role/${id}`)
